2. Enumeration & SNMP

In it we make active connections with the target system to get more information.
This information help us to gain access to the system (exploit).

Information to enumerate:


Techniques:

  1. Using Email ID
    Email ID contains username and domain name in it.

  2. Using Default password
    Using default settings,password and configuration of a device.

  3. SNMP Enumeration
    SNMP (Simple Network Management Protocol) is used for managing network devices.
    It is used for collecting information from and configuring network devices such as servers, printers, hubs, switches, and routersCommunity strings are used to authenticate devices.
    It uses UDP [Ports:161, 162 (Trap)]
    Default community strings or guesses can be used to extract information about a device.

29e542459b59fde83d227a5092a0aec6.png

e421dc9e661cc28230459d97b7c84dcc.png

Information to enumerate:

Enmuerating SNMP in Metasploitable2
By default SNMP is disabled in Metasploitable2.

Enable SNMP in Metasploitable2
Edit /etc/default/snmpd
and change 127.0.0.1 to 0.0.0.0 and reboot it.

  1. snmp-sysdescr - Attempts to extract system information from an SNMP version 1 service.
  2. snmp-info - Extracts basic information from an SNMPv3 GET request.

4b4f741f7a0ffebff57b57e9c71b0895.png

engineID

Every SNMPv3 device has its own ID(engineID). It is a unique number for every context that a agents operates in. But on most of the devices only one SNMP agent runs, so every device has a unique engineID.

snmpEngineTime/Boots
In SMPv3 to protect against replay attacks (when an attacker records the packets and sends it later again towards the destination) the manager first asks the agent how many times it rebooted already (snmpEngineBoots) and how long ago the last reboot was (snmpEngineTime) .The communication is encrypted.

  1. snmp_enum
    It performs performs enumeration of any devices with SNMP protocol support.

f1de073cc591c0117661aa347524b3cf.png

f54ead7833f26d31073625fd3499705f.png

1d812c4f39fb2b0c0768b7e3c9ab0aca.png

  1. snmp_enumshares - SNMP Windows SMB Share Enumeration
    It determine any available shares.This module is for **Microsoft Windows OS.**This module will use LanManager OID values to enumerate SMB shares on a Windows system via SNMP.

ceedece8ac8c9bf83b8a954dc39ed517.png

  1. snmp_enumusers
    It gathers a list of usernames on the remote system (Windows/Solaris).

c108069af3c0a3585e424630f286b48f.png

  1. snmp_login
    It scans a range of IP addresses to determine the community string for SNMP-enabled devices by loging in to SNMP devices using default public and private community strings.
    It also identify attached devices that are insecurely configured.

b52ffeb50c4e357ffa1ff898e52bbf14.png